package com.dbdoc.service.impl;

import com.dbdoc.entity.CourseBase;
import com.dbdoc.mapper.CourseBaseMapper;
import com.dbdoc.service.ICourseBaseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
/**
 * <p>
 * 课程基础表 服务实现类
 * </p>
 *
 * @author liuChengWen
 * @since 2020-12-28
 */
@Service
public class CourseBaseServiceImpl extends ServiceImpl<CourseBaseMapper, CourseBase> implements ICourseBaseService {

    @Resource
    CourseBaseMapper baseMapper;

    public Page<CourseBase> pageList(CourseBase entity, Integer pageNum, Integer pageSize){
        Page<CourseBase> page = new Page<>(pageNum.longValue(), pageSize.longValue());
        Wrapper<CourseBase> wrapper=new QueryWrapper<>(entity);
        Page<CourseBase> pageList =baseMapper.selectPage(page,wrapper);
        return pageList;
    }
}
